<?php 
	namespace app\home\controller;

	use think\Controller;

	use think\Input;

	use think\Db;

	use think\Request;

	use think\Session;

	class Queren extends Controller{

		//确认订单页面
		public function index(){  
	       
	       	$user = session('userad'); 
	       
	       	$user_id = $user['user_id'];

	       	//查询用户是否已添加收货地址，如果有就显示，如果没有就添加
	       	$result = db('address')->where('user_id',$user_id)->find();

			if($result){
				
				$this->assign('result',1);
			
			}else{
				
				$this->assign('result',0);
			}
			
			return $this->fetch();
		}		

	}
 ?>